/****************************************************************************
**  头像控件
****************************************************************************/

import QtQuick 2.12
import QtGraphicalEffects 1.12

Rectangle {
    id: container
    radius: 5
    property var headUrl
    Image {
        id: _image
        anchors.fill:parent
        antialiasing: true
        fillMode: Image.PreserveAspectFit
        source: headUrl
        visible: false
        mipmap: true
    }
    Rectangle {
            id: _mask
            color: "black"
            anchors.fill: parent
            radius: 5
            visible: false
            antialiasing: true
    }
    OpacityMask {
        id:mask_image
        anchors.fill: container
        source: _image
        maskSource: _mask        // 将source使用icon的规则在icon上显示
        visible: true
        antialiasing: true
    }
}
